﻿using System.Windows;
using Microsoft.Practices.Unity;
using Microsoft.Practices.ServiceLocation;
using Microsoft.Practices.Unity.Configuration;
using DSPL.Contracts;
using DSPL.Common;
using System.Configuration;
using DSPL.Contracts.Common;

namespace DSPL.Finac
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
       // public static IUnityContainer GlobalUnityContainer = new UnityContainer();

       // public static string FinConnectionString = ConfigurationManager.ConnectionStrings["Global"].ConnectionString;


        protected override void OnStartup(StartupEventArgs e)
        {
            if (GlobalVariables.Connectionstring == "" || (GlobalVariables.Server == "" && GlobalVariables.UserName == "" && GlobalVariables.Password == ""))
            {
                DatabaseRegister dbWin = new DatabaseRegister();
                dbWin.Show();
            }
            else
            {
                base.OnStartup(e);
                //GlobalUnityContainer.LoadConfiguration("customContainer");

                FinacWindow startUpWindow = new FinacWindow();
                //AreaMasterView startUpWindow = new AreaMasterView();
                startUpWindow.Show();
            }

        }
    }
}
